package com.bmadmin.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bmadmin.domain.LayUiDataTablePOJO;
import com.bmadmin.domain.NoticeDomain;
import com.bmadmin.domain.SysDepartmentsPOJO;
import com.bmadmin.domain.SysUsersPOJO;
import com.bmadmin.mapper.TzsDao;
import com.bmadmin.service.TzsService;
@Service
@Transactional
public class TzsServiceImpl implements TzsService {
	@Autowired
	TzsDao tzsDao;
	
	public List<NoticeDomain> getTzsApplyList(Map map){
		return tzsDao.getTzsApplyList(map);
	}
	
	public LayUiDataTablePOJO getDepList(){
		LayUiDataTablePOJO result = new LayUiDataTablePOJO();

        List<SysDepartmentsPOJO> deplist = tzsDao.getDepList();
        result.setCode(0);
        result.setMsg("查询成功");
        result.setData(deplist);
        result.setCount(deplist.size());

        return result;
	}
	
	public int insertTzs(NoticeDomain notice){
		return tzsDao.insertTzs(notice);
	}
	
	public int deleteTzs(String n_id){
		return tzsDao.deleteTzs(n_id);
	}
	
	public int UpdateTzs(NoticeDomain notice){
		return tzsDao.UpdateTzs(notice);
	}
	
	public int upTzs(NoticeDomain notice){
		return tzsDao.upTzs(notice);
	}
	
	public int verifyTzs(NoticeDomain notice){
		return tzsDao.verifyTzs(notice);
	}
	
	public int burTzs(NoticeDomain notice){
		return tzsDao.burTzs(notice);
	}
	
	public LayUiDataTablePOJO getUserList(String n_id){
		LayUiDataTablePOJO result = new LayUiDataTablePOJO();

        List<SysUsersPOJO> userlist = tzsDao.getUserList(n_id);
        result.setCode(0);
        result.setMsg("查询成功");
        result.setData(userlist);
        result.setCount(userlist.size());

        return result;
	}
	
	public int jsTzs(NoticeDomain notice){
		return tzsDao.jsTzs(notice);
	}
	
	public int sureTzs(NoticeDomain notice){
		return tzsDao.sureTzs(notice);
	}
	
	public int uploadTzs(NoticeDomain notice){
		return tzsDao.uploadTzs(notice);
	}
	
	public int UpdateFileName(NoticeDomain notice){
		return tzsDao.UpdateFileName(notice);
	}
	
	public int UpdateBackFileName(NoticeDomain notice){
		return tzsDao.UpdateBackFileName(notice);
	}
	
	public int deleteFile(String n_id){
		return tzsDao.deleteFile(n_id);
	}
	
	public int deleteBackFile(String n_id){
		return tzsDao.deleteBackFile(n_id);
	}
}
